import ajax from './ajax';

const BASE_URL = 'https://study.rzkeji.com/';


//用户授权登陆
export const postCode = (params) => ajax(BASE_URL + 'api/auth/wxLogin', params, 'POST');
//获取活动列表分类
export const getClassify = () => ajax(BASE_URL + 'api/activity/classify');
//获取最新资讯
export const getNewsList = (params) => ajax(BASE_URL + 'api/news/getNewsList',params);
//获取首页精选分类列表数据||活动列表页数据||按搜索查询数据||按分类查询数据
export const getActivityList = (params) => ajax(BASE_URL + 'api/activity/getActivity', params);
//获取用户参与列表数据
export const getJoinActivityList = (params) => ajax(BASE_URL + 'api/center/getUserJoinActivity', params);
//获取轮播图数据
export const getCarousel = () => ajax(BASE_URL + 'api/other/get-banner-list');
//获取后端返回的用户信息
export const getUserInfo = (parmas) => ajax(BASE_URL + 'api/center/getUserInfo', parmas);
//获取活动详情
export const getActivityDtail = (parmas) => ajax(BASE_URL + 'api/activity/getActivityDetail', parmas);
//获取最新资讯详情
export const getNewsDtail = (parmas) => ajax(BASE_URL + 'api/news/getNewsDetail', parmas);
//创建活动订单
export const postBuildOrder = (parmas) => ajax(BASE_URL + 'api/order/buildOrder', parmas, 'POST');
//发送微信支付请求
export const postWeChatPayment = (parmas) => ajax(BASE_URL + 'api/payment/weChatPayment', parmas, 'POST');
//添加收藏
export const postActivityKeep = (parmas) => ajax(BASE_URL + 'api/center/activityCollection', parmas, 'POST');
//取消收藏
export const postCancelActivityKeep = (parmas) => ajax(BASE_URL + 'api/center/cancelCollection', parmas, 'POST');
//获取收藏列表
export const getKeepActivityList = (parmas) => ajax(BASE_URL + 'api/center/getUserCollectionActivityList',parmas);
//提交合作意愿
export const postCooperationIntention = (parmas) => ajax(BASE_URL + 'api/news/writeCooperationIntention', parmas, 'POST');
//获取活动方列表数据
export const getPartyList = (parmas) => ajax(BASE_URL + 'api/activity/getActivePartyList', parmas);
//获取活动方详情数据
export const getActivePartyDetail = (parmas) => ajax(BASE_URL + 'api/activity/getActivePartyDetail', parmas);
//获取关于我们数据
export const getAbout = (parmas) => ajax(BASE_URL + 'api/center/getAboutUs');
